{
  interface BaseInfo{
    name: string;
  }
  
  interface BoyFriend extends BaseInfo{
    age: number;
    cook: () => void;
  }

  interface Programmer extends BaseInfo{
    language: string;
    program: () => void;
  }

  class Person implements BoyFriend, Programmer{
    name: string;
    age: number;
    language: string;
    constructor(name: string, age: number, language: string) {
      this.name = name;
      this.age = age;
      this.language = language;
    }
    cook(){
      console.log('我可以做饭');
    }

    program(){
      console.log('我可以编写程序');
    }
  }

  let wangmiao = new Person('王淼', 18, 'JavaScript');
  let xudong = new Person('徐东', 18, 'Java');

}
